package org.geektimes.projects.user.management;

import org.geektimes.projects.user.domain.User;
import org.geektimes.projects.user.management.standard.mbean.UserServiceManagement;
import org.geektimes.projects.user.management.standard.mbean.UserServiceManagementMBean;

import javax.management.MBeanInfo;
import javax.management.NotCompliantMBeanException;
import javax.management.StandardMBean;

public class DynamicMBeanDemo {
    public static void main(String[] args) throws NotCompliantMBeanException {
        StandardMBean standardMBean = new StandardMBean(new UserServiceManagement(new User()), UserServiceManagementMBean.class);
        MBeanInfo mBeanInfo = standardMBean.getMBeanInfo();
        System.out.println(mBeanInfo);
    }
}
